<template>
  <el-dialog
    v-model="visible"
    v-if="load"
    title="变更内容"
    width="700"
    draggable
    @close="close"
    :z-index="2000"
  >
    <el-table :data="tableData" border style="width: 100%" height="500">
      <el-table-column prop="name" label="SKU" width="200" />
      <el-table-column prop="type_text" label="变更内容" width="400" />
    </el-table>
    <template #footer>
      <div class="flex justify-center py-2">
        <el-button @click="close">关闭</el-button>
      </div>
    </template>
  </el-dialog>
</template>
<script setup name="orderModel">
import { reactive, toRefs, getCurrentInstance } from "vue";
import { ElMessage } from "element-plus";
const { proxy } = getCurrentInstance();
const emits = defineEmits(["query"]);

const data = reactive({
  tableData: [],
  visible: false,
  load: false,
});
const { tableData, visible, load } = toRefs(data);
const open = async () => {
  if (!load.value) {
    load.value = true;
    await 1;
  }
  visible.value = true;
};

onMounted(() => {});
const close = () => {
  visible.value = false;
};
defineExpose({ open });
</script>
